package org.coast.mvc.util.datetime;

import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;

public class DateTimeUtil {

    public static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");

    /**
     * 获取当前时间字符串 时分秒
     *
     * @return 2020-03-02 23:47:46
     */
    public static String getNowString() {
        return formatter.format(ZonedDateTime.now());
    }
}
